/**
 * Created by Administrator on 2017/6/20.
 */
Zepto(function(){
    //静态资源加载完成loading图片隐藏
   /* setTimeout(function(){
        $('#loading').hide();
    },500);
    //页面显示
    $("body").animate({
        'opacity':1,
    },500,"ease-out")

    //退回首页
    $("#back").on("click",function(){
        location.href="index.html";
    })*/
    //查询按钮事件
    var toggle=true;
    $("#search").on("click",function(){
        if(toggle){
            toggle=!toggle;
            $(".timeline-nav-wrap").animate({"opacity":1},500,"ease-out");
            $.each($(".timeline-nav li"),function(i,item){
                var that=$(this);
                var chat=true;
                var Aactive=that.children("a")
                Aactive.on("click",function(){
                    if(chat){
                        chat=!chat;
                        that.children("ul").animate({"display":"block"},500,"linear");
                        that.siblings("li").children("ul").animate({"display":"none"},500,"linear");
                        that.find("ul").find("a").on("click",function(){
                            //处理选择日期时间
                        })
                    }else{
                        chat=!chat;
                        that.children("ul").animate({"display":"none"},500,"linear");
                    }

                })
            })
        }else{
            toggle=!toggle;
            $(".timeline-nav-wrap").animate({"opacity":0},500,"ease-out");
        }

    });
    

})